package com.jsyxdl.entity;

import java.math.BigInteger;

public class PartUsageLinkDiffResultDTO {
    private String boid;// 子件OID
    private String materialType;// 子件的材料类型，
    private String identifierDisplayName; // 子件标识
    private String diffType; // 差异类型：新增、移除、数量变化
    private Double oldAmount = 0.0; // 旧数量，默认值为0
    private Double newAmount = 0.0; // 新数量，默认值为0
    private Double amountDiff; // 数量差值
    private String unitKey; // 单位
    private String drawCode; // 图号
    private String material; // 材料
    private String remark; // 备注
    private Double weight = 0.0; // 单件净重
    private String spec; // 规格
    private String objectNumber; // 物料编码
    private String name; // 名称
    private String version; // 版本
    private String iteration; // 版本序号

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getIteration() {
        return iteration;
    }

    public void setIteration(String iteration) {
        this.iteration = iteration;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getObjectNumber() {
        return objectNumber;
    }

    public void setObjectNumber(String objectNumber) {
        this.objectNumber = objectNumber;
    }

    public String getUnitKey() {
        return unitKey;
    }

    public void setUnitKey(String unitKey) {
        this.unitKey = unitKey;
    }

    public String getDrawCode() {
        return drawCode;
    }

    public void setDrawCode(String drawCode) {
        this.drawCode = drawCode;
    }

    public String getMaterial() {
        return material;
    }

    public void setMaterial(String material) {
        this.material = material;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    // 构造方法
    public PartUsageLinkDiffResultDTO(BigInteger boid, String diffType) {
        this.boid = String.valueOf(boid);
        this.diffType = diffType;
    }

    // 构造方法
    public PartUsageLinkDiffResultDTO(String boid, String diffType) {
        this.boid = String.valueOf(boid);
        this.diffType = diffType;
    }

    // Getter 和 Setter 方法
    public String getBoid() {
        return boid;
    }

    public void setBoid(String boid) {
        this.boid = boid;
    }

    public String getDiffType() {
        return diffType;
    }

    public void setDiffType(String diffType) {
        this.diffType = diffType;
    }

    public Double getOldAmount() {
        return oldAmount;
    }

    public void setOldAmount(Double oldAmount) {
        this.oldAmount = oldAmount != null ? oldAmount : 0.0;
    }

    public Double getNewAmount() {
        return newAmount;
    }

    public void setNewAmount(Double newAmount) {
        this.newAmount = newAmount != null ? newAmount : 0.0;
    }

    public Double getAmountDiff() {
        return amountDiff;
    }

    public void setAmountDiff(Double amountDiff) {
        this.amountDiff = amountDiff;
    }

    @Override
    public String toString() {
        return "PartUsageLinkDiffResult{" +
                "boid='" + boid + '\'' +
                ", diffType='" + diffType + '\'' +
                ", oldAmount=" + oldAmount +
                ", newAmount=" + newAmount +
                ", amountDiff=" + amountDiff +
                '}';
    }

    public String getIdentifierDisplayName() {
        return identifierDisplayName;
    }

    public void setIdentifierDisplayName(String identifierDisplayName) {
        this.identifierDisplayName = identifierDisplayName;
    }

    public String getMaterialType() {
        return materialType;
    }

    public void setMaterialType(String materialType) {
        this.materialType = materialType;
    }
}

